

local mt = ac.skill['妖术']
mt.temp = '攻击触发'
function mt:on_init()
    self.odds = self.data1
end

function mt:on_run(hero,target)
    if not target:is_type('Boss') then
        target:add_buff '变形'{time = 2}
    end
end




local mt = ac.skill['分叉闪电']
mt.temp = '叉状闪电'

function mt:on_add()
    local hero = self.owner
    self:gc(hero:event '单位-攻击命中'(function(_,_,target)
        if not self:is_cooling() then
            self:cooling()
            local cast = self:create_cast()
            cast.damage = hero:get('攻击') * self.data1/100
            cast:notify('create_lightning',target)
        end
    end))
end




